 /*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

 /**
 * Project  : EasyAvatar-Android
 * Package  : net.solosky.easyavatar.bean
 * File     : Contact.java
 * Author   : solosky < solosky772@qq.com >
 * Created  : Nov 13, 2011
 * License  : Apache License 2.0 
 */
package net.solosky.easyavatar.bean;

import net.solosky.easyavatar.api.util.PinYinUtil;
import android.graphics.Bitmap;

/**
 *
 * 手机中的联系人
 *
 * @author solosky <solosky772@qq.com>
 *
 */
public class Contact {
	/**ID*/
	private String id;
	/**手机号*/
	private String mobile;
	/**姓名*/
	private String name;
	/**名字的拼音*/
	private String pinyin;
	/**已经有的头像*/
	private Bitmap head;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Bitmap getHead() {
		return head;
	}
	public void setHead(Bitmap head) {
		this.head = head;
	}
	public String getPinyin() {
		if(pinyin==null){
			pinyin = PinYinUtil.getPinYin(name);
		}
		return pinyin;
	}
	@Override
	public String toString() {
		return "Contact [id=" + id + ", mobile=" + mobile + ", name=" + name
				+ ", head=" + head + "]";
	}
	
	
}
